{%- extends "page.html" %}
{# Enhanced Search Page - Clean template without embedded CSS/JS #}

{% block docs_body %}
<div class="bd-search-container">
  <h1>{{ _("Search") }}</h1>

  <noscript>
    <div class="alert alert-error">
      <p class="alert-title">{% trans %}Error{% endtrans %}</p>
      <p>{% trans %}Please activate JavaScript to enable the search functionality.{% endtrans %}</p>
    </div>
  </noscript>

  {# Search and filter controls container - will be enhanced by JavaScript #}
  <div class="search-controls-container mb-4">
    <input type="search" class="form-control" id="enhanced-search-page-input"
      placeholder="Search NVIDIA documentation..." autocomplete="off" spellcheck="false"
      aria-label="Search documentation">
  </div>

  {# Search results container #}
  <div id="enhanced-search-page-results">
    <div class="search-empty-state text-center py-4">
      <i class="fa-solid fa-magnifying-glass fa-2x mb-3 search-icon-primary"></i>
      <h4 class="search-empty-title">Search Documentation</h4>
      <p class="search-empty-text">Start typing to search across all documentation pages...</p>
      <div class="mt-3">
        <small class="search-empty-tips">
          <i class="fa-solid fa-lightbulb search-icon-primary"></i>
          <strong>Search Tips:</strong> Use specific terms for better results • Search includes titles, content, and
          headings
        </small>
      </div>
    </div>
  </div>
</div>
{% endblock docs_body %}

{# Page metadata #}
{%- block htmltitle -%}
<title>{{ _("Search") }} - {{ title or docstitle }}</title>
{%- endblock htmltitle -%}

{# Load our enhanced search scripts #}
{% block scripts -%}
{{ super() }}
{# Search page script is loaded via html_js_files in conf.py #}
{%- endblock scripts %}